<h:panelGroup xmlns:h='http://java.sun.com/jsf/html'
              xmlns:p='http://primefaces.org/ui'
              xmlns:z='http://savanti.com.bo/ui'
              xmlns:x='http://java.sun.com/jsf/composite/ui/component' styleClass='IIVentasFrecuencia' id='IIVentasFrecuencia'><p:growl id='growl'/>

<p:toolbar styleClass='toolBar'>

<p:toolbarGroup style='width:100%'>

<p:commandButton icon='ui-icon-new'  title='Nuevo' actionListener='#{IIVentasFrecuencia.uiClean}'  update='@(.IIVentasFrecuencia)' style='width:70px' process='@this'/>

<p:commandButton id='#{formId}btnTitle' value='FRECUENCIA' style='width:10%;position:absolute;left:40%;background: transparent;border: none;font-weight: bold' actionListener='#{IIVentasFrecuencia.uiForm}'  update='@(.IIVentasFrecuencia)' process='@this'/>

<p:commandButton icon='ui-icon-find' title='Buscar'  actionListener='#{IIVentasFrecuencia.uiFind}'   update='@(.IIVentasFrecuencia)' style='width:70px;float:right' process='@this ps'/>

</p:toolbarGroup>

</p:toolbar>


<h:panelGrid id='bean' columns='2' styleClass='bean align-top'>

<x:beanPanel id='hd' bean='#{IIVentasFrecuencia}' title='Resumen' cellpadding='2' columns='1'>

<h:panelGrid columns='5' cellpadding='4'>
<x:fieldN t='Lun'  v='#{bean.week[1]}' r='0'  wT='25px'/>
<x:fieldN t='Mar'  v='#{bean.week[2]}' r='0'  wT='25px'/>
<x:fieldN t='Mie'  v='#{bean.week[3]}' r='0'  wT='25px'/>
<x:fieldN t='Jue'  v='#{bean.week[4]}' r='0'  wT='25px'/>
<x:fieldN t='Prom dias' v='#{bean.promedioD}' wT='50px' r='1'/>
</h:panelGrid>

<h:panelGrid columns='5' cellpadding='4' style='width:100%'>
<x:fieldN t='Vie'  v='#{bean.week[5]}' r='0' wT='25px'/>
<x:fieldN t='Sab'  v='#{bean.week[6]}' r='0' wT='25px'/>
<x:fieldN t='Dom'  v='#{bean.week[0]}' r='0' wT='25px'/>
<x:fieldN t=''     v=''                r='0' wT='32px'/>
<x:fieldN t='Prom Bs.' v='#{bean.promedioV}' wT='50px'/>
</h:panelGrid>

</x:beanPanel>


<x:beanPanel id='ps' bean='#{IIVentasFrecuencia}' title='Buscar' cellpadding='6' columns='1' style='min-width: 300px'>

<x:fieldS t='Cliente' v='#{bean.cliente}' w='250px' x='#{x}' xL='#{x.persona.nombre}' b='#{bean}'/>

<h:panelGrid columns='2' cellpadding='0' cellspacing='0'>

<x:fieldD t='Desde'   v='#{bean.dateIni}' w='70px'/>

<x:fieldD t='Hasta'   v='#{bean.dateEnd}' w='70px' sT='margin-left:17px'/>

</h:panelGrid>

</x:beanPanel>

</h:panelGrid>


<p:dataTable value='#{IIVentasFrecuencia.lsEntity}' var='x' paginator='true' paginatorPosition='bottom' rows='100' resizableColumns='true'

             paginatorAlwaysVisible='false' emptyMessage='' style='width:100%'>

<z:columnD t='Mes'   v='#{x[1]}' w='60px'  pattern='MMM'/>

<z:columnD t='Dia'   v='#{x[1]}' w='60px' pattern='EEE'/>

<z:columnD t='Fecha' v='#{x[1]}' w='60px' pattern='dd'/>

<z:columnN t='Dias'  v='#{x[2]}' round='0'/>

<z:columnN t='Bs.'   v='#{x[3]}'/>

</p:dataTable>

</h:panelGroup>